package com.linkhub.oms.data.sync.api.shopify.domain.request;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;

import java.io.Serializable;
import java.util.List;

/**
 * @description FulfillmentRequest
 */
@Data
@NoArgsConstructor
public class FulfillmentRequest implements Serializable {

    @JSONField(name = "fulfillment")
    private Fulfillment fulfillment;

    @NoArgsConstructor
    @Data
    public static class Fulfillment {
        @JSONField(name = "tracking_info")
        private TrackingInfo trackingInfo;
        @JSONField(name = "line_items_by_fulfillment_order")
        private List<LineItemsByFulfillmentOrder> lineItemsByFulfillmentOrder;
    }

    @NoArgsConstructor
    @Data
    public static class TrackingInfo {
        @JSONField(name = "number")
        private String number;
        @JSONField(name = "company")
        private String company;
        @JSONField(name = "url")
        private String url;
    }

    @NoArgsConstructor
    @Data
    public static class LineItemsByFulfillmentOrder {
        @JSONField(name = "fulfillment_order_id")
        private long fulfillmentOrderId;
        @JSONField(name = "fulfillment_order_line_items")
        private List<FulfillmentOrderLineItem> fulfillmentOrderLineItems;
    }

    @NoArgsConstructor
    @Data
    public static class FulfillmentOrderLineItem {
        @JSONField(name = "id")
        private long id;
        @JSONField(name = "quantity")
        private int quantity;
    }
}